 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKFunction/FunctionModel.h>

@implementation FunctionSpec
-(id) initWithFunctionId:(NSString*) functionId
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      runtime:(NSString*)runtime
      createTime:(NSString*)createTime
      updateTime:(NSString*)updateTime
      version:(NSString*)version
      downloadUrl:(NSString*)downloadUrl { 
     self.functionId = functionId;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.runtime = runtime;               
     self.createTime = createTime;               
     self.updateTime = updateTime;               
     self.version = version;               
     self.downloadUrl = downloadUrl;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self functionId])
    {
        [result setValue:[self functionId] forKey:@"functionId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self runtime])
    {
        [result setValue:[self runtime] forKey:@"runtime"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self downloadUrl])
    {
        [result setValue:[self downloadUrl] forKey:@"downloadUrl"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.functionId = [dictionary objectForKey:@"functionId"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.runtime = [dictionary objectForKey:@"runtime"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    self.version = [dictionary objectForKey:@"version"];
    self.downloadUrl = [dictionary objectForKey:@"downloadUrl"];
    return self;
}
 @end
@implementation FunctionInvokeResult
-(id) initWithResult:(NSString*) result
      codeCheckSum:(NSString*)codeCheckSum
      invokeTime:(NSNumber*)invokeTime
      billingTime:(NSNumber*)billingTime
      setupMem:(NSNumber*)setupMem
      realMem:(NSNumber*)realMem
      logStr:(NSString*)logStr { 
     self.result = result;               
     self.codeCheckSum = codeCheckSum;               
     self.invokeTime = invokeTime;               
     self.billingTime = billingTime;               
     self.setupMem = setupMem;               
     self.realMem = realMem;               
     self.logStr = logStr;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    if([self codeCheckSum])
    {
        [result setValue:[self codeCheckSum] forKey:@"codeCheckSum"];
    }
    if([self invokeTime])
    {
        [result setValue:[self invokeTime] forKey:@"invokeTime"];
    }
    if([self billingTime])
    {
        [result setValue:[self billingTime] forKey:@"billingTime"];
    }
    if([self setupMem])
    {
        [result setValue:[self setupMem] forKey:@"setupMem"];
    }
    if([self realMem])
    {
        [result setValue:[self realMem] forKey:@"realMem"];
    }
    if([self logStr])
    {
        [result setValue:[self logStr] forKey:@"logStr"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.result = [dictionary objectForKey:@"result"];
    self.codeCheckSum = [dictionary objectForKey:@"codeCheckSum"];
    self.invokeTime = [dictionary objectForKey:@"invokeTime"];
    self.billingTime = [dictionary objectForKey:@"billingTime"];
    self.setupMem = [dictionary objectForKey:@"setupMem"];
    self.realMem = [dictionary objectForKey:@"realMem"];
    self.logStr = [dictionary objectForKey:@"logStr"];
    return self;
}
 @end
@implementation Code
-(id) initWithZipFile:(NSString*) zipFile
      onlineCode:(NSString*)onlineCode
      bucketName:(NSString*)bucketName
      objectName:(NSString*)objectName { 
     self.zipFile = zipFile;               
     self.onlineCode = onlineCode;               
     self.bucketName = bucketName;               
     self.objectName = objectName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self zipFile])
    {
        [result setValue:[self zipFile] forKey:@"zipFile"];
    }
    if([self onlineCode])
    {
        [result setValue:[self onlineCode] forKey:@"onlineCode"];
    }
    if([self bucketName])
    {
        [result setValue:[self bucketName] forKey:@"bucketName"];
    }
    if([self objectName])
    {
        [result setValue:[self objectName] forKey:@"objectName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.zipFile = [dictionary objectForKey:@"zipFile"];
    self.onlineCode = [dictionary objectForKey:@"onlineCode"];
    self.bucketName = [dictionary objectForKey:@"bucketName"];
    self.objectName = [dictionary objectForKey:@"objectName"];
    return self;
}
 @end
@implementation Env
-(id) initWithData:(NSMutableDictionary<NSString*,NSString*>*) data { 
     self.data = data;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[self data] forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [dictionary objectForKey:@"data"];
    return self;
}
 @end
@implementation Statistics
-(id) initWithCurrentFunctionNumber:(NSNumber*) currentFunctionNumber
      maxFunctionNumber:(NSNumber*)maxFunctionNumber
      currentCodeSize:(NSNumber*)currentCodeSize
      maxCodeSize:(NSNumber*)maxCodeSize { 
     self.currentFunctionNumber = currentFunctionNumber;               
     self.maxFunctionNumber = maxFunctionNumber;               
     self.currentCodeSize = currentCodeSize;               
     self.maxCodeSize = maxCodeSize;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self currentFunctionNumber])
    {
        [result setValue:[self currentFunctionNumber] forKey:@"currentFunctionNumber"];
    }
    if([self maxFunctionNumber])
    {
        [result setValue:[self maxFunctionNumber] forKey:@"maxFunctionNumber"];
    }
    if([self currentCodeSize])
    {
        [result setValue:[self currentCodeSize] forKey:@"currentCodeSize"];
    }
    if([self maxCodeSize])
    {
        [result setValue:[self maxCodeSize] forKey:@"maxCodeSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.currentFunctionNumber = [dictionary objectForKey:@"currentFunctionNumber"];
    self.maxFunctionNumber = [dictionary objectForKey:@"maxFunctionNumber"];
    self.currentCodeSize = [dictionary objectForKey:@"currentCodeSize"];
    self.maxCodeSize = [dictionary objectForKey:@"maxCodeSize"];
    return self;
}
 @end
@implementation OssTrigger
-(id) initWithBucket:(NSString*) bucket
      configId:(NSString*)configId
      events:(NSArray<NSString*>*)events
      prefix:(NSString*)prefix
      suffix:(NSString*)suffix { 
     self.bucket = bucket;               
     self.configId = configId;               
     self.events = events;               
     self.prefix = prefix;               
     self.suffix = suffix;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self bucket])
    {
        [result setValue:[self bucket] forKey:@"bucket"];
    }
    if([self configId])
    {
        [result setValue:[self configId] forKey:@"configId"];
    }
    if([self events])
    {
        [result setValue:[self events] forKey:@"events"];
    }
    if([self prefix])
    {
        [result setValue:[self prefix] forKey:@"prefix"];
    }
    if([self suffix])
    {
        [result setValue:[self suffix] forKey:@"suffix"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.bucket = [dictionary objectForKey:@"bucket"];
    self.configId = [dictionary objectForKey:@"configId"];
    self.events = [dictionary objectForKey:@"events"];
    self.prefix = [dictionary objectForKey:@"prefix"];
    self.suffix = [dictionary objectForKey:@"suffix"];
    return self;
}
 @end
@implementation Trigger
-(id) initWithTriggerId:(NSString*) triggerId
      functionName:(NSString*)functionName
      versionName:(NSString*)versionName
      eventSource:(NSString*)eventSource
      eventSourceId:(NSString*)eventSourceId
      createTime:(NSString*)createTime
      updateTime:(NSString*)updateTime { 
     self.triggerId = triggerId;               
     self.functionName = functionName;               
     self.versionName = versionName;               
     self.eventSource = eventSource;               
     self.eventSourceId = eventSourceId;               
     self.createTime = createTime;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self triggerId])
    {
        [result setValue:[self triggerId] forKey:@"triggerId"];
    }
    if([self functionName])
    {
        [result setValue:[self functionName] forKey:@"functionName"];
    }
    if([self versionName])
    {
        [result setValue:[self versionName] forKey:@"versionName"];
    }
    if([self eventSource])
    {
        [result setValue:[self eventSource] forKey:@"eventSource"];
    }
    if([self eventSourceId])
    {
        [result setValue:[self eventSourceId] forKey:@"eventSourceId"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.triggerId = [dictionary objectForKey:@"triggerId"];
    self.functionName = [dictionary objectForKey:@"functionName"];
    self.versionName = [dictionary objectForKey:@"versionName"];
    self.eventSource = [dictionary objectForKey:@"eventSource"];
    self.eventSourceId = [dictionary objectForKey:@"eventSourceId"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation ApiTrigger
-(id) initWithApiId:(NSString*) apiId
      apiGroupId:(NSString*)apiGroupId
      groupName:(NSString*)groupName
      revision:(NSString*)revision
      apiName:(NSString*)apiName
      action:(NSString*)action
      path:(NSArray<NSString*>*)path
      descriptionValue:(NSString*)descriptionValue
      deploymentStatus:(NSNumber*)deploymentStatus { 
     self.apiId = apiId;               
     self.apiGroupId = apiGroupId;               
     self.groupName = groupName;               
     self.revision = revision;               
     self.apiName = apiName;               
     self.action = action;               
     self.path = path;               
     self.descriptionValue = descriptionValue;               
     self.deploymentStatus = deploymentStatus;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self apiId])
    {
        [result setValue:[self apiId] forKey:@"apiId"];
    }
    if([self apiGroupId])
    {
        [result setValue:[self apiGroupId] forKey:@"apiGroupId"];
    }
    if([self groupName])
    {
        [result setValue:[self groupName] forKey:@"groupName"];
    }
    if([self revision])
    {
        [result setValue:[self revision] forKey:@"revision"];
    }
    if([self apiName])
    {
        [result setValue:[self apiName] forKey:@"apiName"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self path])
    {
        [result setValue:[self path] forKey:@"path"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self deploymentStatus])
    {
        [result setValue:[self deploymentStatus] forKey:@"deploymentStatus"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.apiId = [dictionary objectForKey:@"apiId"];
    self.apiGroupId = [dictionary objectForKey:@"apiGroupId"];
    self.groupName = [dictionary objectForKey:@"groupName"];
    self.revision = [dictionary objectForKey:@"revision"];
    self.apiName = [dictionary objectForKey:@"apiName"];
    self.action = [dictionary objectForKey:@"action"];
    self.path = [dictionary objectForKey:@"path"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.deploymentStatus = [dictionary objectForKey:@"deploymentStatus"];
    return self;
}
 @end
@implementation Flavor
-(id) initWithFlavorKey:(NSString*) flavorKey
      cpu:(NSNumber*)cpu
      memory:(NSNumber*)memory
      disk:(NSNumber*)disk { 
     self.flavorKey = flavorKey;               
     self.cpu = cpu;               
     self.memory = memory;               
     self.disk = disk;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self flavorKey])
    {
        [result setValue:[self flavorKey] forKey:@"flavorKey"];
    }
    if([self cpu])
    {
        [result setValue:[self cpu] forKey:@"cpu"];
    }
    if([self memory])
    {
        [result setValue:[self memory] forKey:@"memory"];
    }
    if([self disk])
    {
        [result setValue:[self disk] forKey:@"disk"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.flavorKey = [dictionary objectForKey:@"flavorKey"];
    self.cpu = [dictionary objectForKey:@"cpu"];
    self.memory = [dictionary objectForKey:@"memory"];
    self.disk = [dictionary objectForKey:@"disk"];
    return self;
}
 @end
@implementation Alias
-(id) initWithAliasId:(NSString*) aliasId
      aliasName:(NSString*)aliasName
      functionName:(NSString*)functionName
      descriptionValue:(NSString*)descriptionValue
      version:(NSString*)version { 
     self.aliasId = aliasId;               
     self.aliasName = aliasName;               
     self.functionName = functionName;               
     self.descriptionValue = descriptionValue;               
     self.version = version;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aliasId])
    {
        [result setValue:[self aliasId] forKey:@"aliasId"];
    }
    if([self aliasName])
    {
        [result setValue:[self aliasName] forKey:@"aliasName"];
    }
    if([self functionName])
    {
        [result setValue:[self functionName] forKey:@"functionName"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aliasId = [dictionary objectForKey:@"aliasId"];
    self.aliasName = [dictionary objectForKey:@"aliasName"];
    self.functionName = [dictionary objectForKey:@"functionName"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.version = [dictionary objectForKey:@"version"];
    return self;
}
 @end
@implementation ListFunctionResult
-(id) initWithFunctions:(NSArray<FunctionSpec*>*) functions
      totalCount:(NSNumber*)totalCount { 
     self.functions = functions;               
     self.totalCount = totalCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self functions])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self functions] count]; i++) {
            FunctionSpec* item = [[self functions] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"functions"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* functionsArray = [dictionary objectForKey:@"functions"];
    if(functionsArray&&![functionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [functionsArray count];i++)
        {
            FunctionSpec* item = [[FunctionSpec alloc]initWithDic:[functionsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.functions = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
}
 @end
@implementation Function
-(id) initWithFunctionId:(NSString*) functionId
      name:(NSString*)name
      descriptionValue:(NSString*)descriptionValue
      entrance:(NSString*)entrance
      memory:(NSNumber*)memory
      runTime:(NSString*)runTime
      overTime:(NSNumber*)overTime
      version:(NSString*)version
      code:(Code*)code
      environment:(Env*)environment
      logSetId:(NSString*)logSetId
      logTopicId:(NSString*)logTopicId
      codeCheckSum:(NSString*)codeCheckSum
      codeSize:(NSNumber*)codeSize
      downloadUrl:(NSString*)downloadUrl
      vpcId:(NSString*)vpcId
      subnetId:(NSString*)subnetId
      createTime:(NSString*)createTime
      updateTime:(NSString*)updateTime { 
     self.functionId = functionId;               
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.entrance = entrance;               
     self.memory = memory;               
     self.runTime = runTime;               
     self.overTime = overTime;               
     self.version = version;               
     self.code = code;               
     self.environment = environment;               
     self.logSetId = logSetId;               
     self.logTopicId = logTopicId;               
     self.codeCheckSum = codeCheckSum;               
     self.codeSize = codeSize;               
     self.downloadUrl = downloadUrl;               
     self.vpcId = vpcId;               
     self.subnetId = subnetId;               
     self.createTime = createTime;               
     self.updateTime = updateTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self functionId])
    {
        [result setValue:[self functionId] forKey:@"functionId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self entrance])
    {
        [result setValue:[self entrance] forKey:@"entrance"];
    }
    if([self memory])
    {
        [result setValue:[self memory] forKey:@"memory"];
    }
    if([self runTime])
    {
        [result setValue:[self runTime] forKey:@"runTime"];
    }
    if([self overTime])
    {
        [result setValue:[self overTime] forKey:@"overTime"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self code])
    {
        [result setValue:[[self code] dictionary]forKey:@"code"];
    }
    if([self environment])
    {
        [result setValue:[[self environment] dictionary]forKey:@"environment"];
    }
    if([self logSetId])
    {
        [result setValue:[self logSetId] forKey:@"logSetId"];
    }
    if([self logTopicId])
    {
        [result setValue:[self logTopicId] forKey:@"logTopicId"];
    }
    if([self codeCheckSum])
    {
        [result setValue:[self codeCheckSum] forKey:@"codeCheckSum"];
    }
    if([self codeSize])
    {
        [result setValue:[self codeSize] forKey:@"codeSize"];
    }
    if([self downloadUrl])
    {
        [result setValue:[self downloadUrl] forKey:@"downloadUrl"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.functionId = [dictionary objectForKey:@"functionId"];
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.entrance = [dictionary objectForKey:@"entrance"];
    self.memory = [dictionary objectForKey:@"memory"];
    self.runTime = [dictionary objectForKey:@"runTime"];
    self.overTime = [dictionary objectForKey:@"overTime"];
    self.version = [dictionary objectForKey:@"version"];
    self.code = [[Code alloc]initWithDic:[dictionary objectForKey:@"code"]];
    self.environment = [[Env alloc]initWithDic:[dictionary objectForKey:@"environment"]];
    self.logSetId = [dictionary objectForKey:@"logSetId"];
    self.logTopicId = [dictionary objectForKey:@"logTopicId"];
    self.codeCheckSum = [dictionary objectForKey:@"codeCheckSum"];
    self.codeSize = [dictionary objectForKey:@"codeSize"];
    self.downloadUrl = [dictionary objectForKey:@"downloadUrl"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
}
 @end
@implementation CreateFunctionInput
-(id) initWithName:(NSString*) name
      descriptionValue:(NSString*)descriptionValue
      entrance:(NSString*)entrance
      memory:(NSNumber*)memory
      runTime:(NSString*)runTime
      overTime:(NSNumber*)overTime
      version:(NSString*)version
      code:(Code*)code
      environment:(Env*)environment
      logSetId:(NSString*)logSetId
      logTopicId:(NSString*)logTopicId
      vpcId:(NSString*)vpcId
      subnetId:(NSString*)subnetId { 
     self.name = name;               
     self.descriptionValue = descriptionValue;               
     self.entrance = entrance;               
     self.memory = memory;               
     self.runTime = runTime;               
     self.overTime = overTime;               
     self.version = version;               
     self.code = code;               
     self.environment = environment;               
     self.logSetId = logSetId;               
     self.logTopicId = logTopicId;               
     self.vpcId = vpcId;               
     self.subnetId = subnetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self entrance])
    {
        [result setValue:[self entrance] forKey:@"entrance"];
    }
    if([self memory])
    {
        [result setValue:[self memory] forKey:@"memory"];
    }
    if([self runTime])
    {
        [result setValue:[self runTime] forKey:@"runTime"];
    }
    if([self overTime])
    {
        [result setValue:[self overTime] forKey:@"overTime"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self code])
    {
        [result setValue:[[self code] dictionary]forKey:@"code"];
    }
    if([self environment])
    {
        [result setValue:[[self environment] dictionary]forKey:@"environment"];
    }
    if([self logSetId])
    {
        [result setValue:[self logSetId] forKey:@"logSetId"];
    }
    if([self logTopicId])
    {
        [result setValue:[self logTopicId] forKey:@"logTopicId"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.entrance = [dictionary objectForKey:@"entrance"];
    self.memory = [dictionary objectForKey:@"memory"];
    self.runTime = [dictionary objectForKey:@"runTime"];
    self.overTime = [dictionary objectForKey:@"overTime"];
    self.version = [dictionary objectForKey:@"version"];
    self.code = [[Code alloc]initWithDic:[dictionary objectForKey:@"code"]];
    self.environment = [[Env alloc]initWithDic:[dictionary objectForKey:@"environment"]];
    self.logSetId = [dictionary objectForKey:@"logSetId"];
    self.logTopicId = [dictionary objectForKey:@"logTopicId"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    return self;
}
 @end
@implementation UpdateFunctionInput
-(id) initWithDescription:(NSString*) descriptionValue
      entrance:(NSString*)entrance
      memory:(NSNumber*)memory
      runTime:(NSString*)runTime
      overTime:(NSNumber*)overTime
      version:(NSString*)version
      code:(Code*)code
      environment:(Env*)environment
      logSetId:(NSString*)logSetId
      logTopicId:(NSString*)logTopicId
      vpcId:(NSString*)vpcId
      subnetId:(NSString*)subnetId { 
     self.descriptionValue = descriptionValue;               
     self.entrance = entrance;               
     self.memory = memory;               
     self.runTime = runTime;               
     self.overTime = overTime;               
     self.version = version;               
     self.code = code;               
     self.environment = environment;               
     self.logSetId = logSetId;               
     self.logTopicId = logTopicId;               
     self.vpcId = vpcId;               
     self.subnetId = subnetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self entrance])
    {
        [result setValue:[self entrance] forKey:@"entrance"];
    }
    if([self memory])
    {
        [result setValue:[self memory] forKey:@"memory"];
    }
    if([self runTime])
    {
        [result setValue:[self runTime] forKey:@"runTime"];
    }
    if([self overTime])
    {
        [result setValue:[self overTime] forKey:@"overTime"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self code])
    {
        [result setValue:[[self code] dictionary]forKey:@"code"];
    }
    if([self environment])
    {
        [result setValue:[[self environment] dictionary]forKey:@"environment"];
    }
    if([self logSetId])
    {
        [result setValue:[self logSetId] forKey:@"logSetId"];
    }
    if([self logTopicId])
    {
        [result setValue:[self logTopicId] forKey:@"logTopicId"];
    }
    if([self vpcId])
    {
        [result setValue:[self vpcId] forKey:@"vpcId"];
    }
    if([self subnetId])
    {
        [result setValue:[self subnetId] forKey:@"subnetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.entrance = [dictionary objectForKey:@"entrance"];
    self.memory = [dictionary objectForKey:@"memory"];
    self.runTime = [dictionary objectForKey:@"runTime"];
    self.overTime = [dictionary objectForKey:@"overTime"];
    self.version = [dictionary objectForKey:@"version"];
    self.code = [[Code alloc]initWithDic:[dictionary objectForKey:@"code"]];
    self.environment = [[Env alloc]initWithDic:[dictionary objectForKey:@"environment"]];
    self.logSetId = [dictionary objectForKey:@"logSetId"];
    self.logTopicId = [dictionary objectForKey:@"logTopicId"];
    self.vpcId = [dictionary objectForKey:@"vpcId"];
    self.subnetId = [dictionary objectForKey:@"subnetId"];
    return self;
}
 @end
@implementation ListTriggerData
-(id) initWithOssTriggers:(NSArray<OssTrigger*>*) ossTriggers
      apiGwTriggers:(NSArray<ApiTrigger*>*)apiGwTriggers { 
     self.ossTriggers = ossTriggers;               
     self.apiGwTriggers = apiGwTriggers;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ossTriggers])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self ossTriggers] count]; i++) {
            OssTrigger* item = [[self ossTriggers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"ossTriggers"];
    }
    if([self apiGwTriggers])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self apiGwTriggers] count]; i++) {
            ApiTrigger* item = [[self apiGwTriggers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"apiGwTriggers"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* ossTriggersArray = [dictionary objectForKey:@"ossTriggers"];
    if(ossTriggersArray&&![ossTriggersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [ossTriggersArray count];i++)
        {
            OssTrigger* item = [[OssTrigger alloc]initWithDic:[ossTriggersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.ossTriggers = propertyArray;
    }
    NSArray* apiGwTriggersArray = [dictionary objectForKey:@"apiGwTriggers"];
    if(apiGwTriggersArray&&![apiGwTriggersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [apiGwTriggersArray count];i++)
        {
            ApiTrigger* item = [[ApiTrigger alloc]initWithDic:[apiGwTriggersArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.apiGwTriggers = propertyArray;
    }
    return self;
}
 @end
 
 


